<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>nest-test</title>
    <script src="https://unpkg.com/axios@0.24.0/dist/axios.min.js"></script>
    <script src="https://unpkg.com/qs@6.10.2/dist/qs.js"></script>
</head>

<body>
    <div>nest-first-try</div>
    <script>
        async function urlParam() {
            const res = await axios.get('/api/user/1');
            console.log(res, 'urlParam');
        }
        urlParam();
    </script>
    <script>
        async function urlQuery() {
            // 指定params axios会自动encode params对象拼接到url上
            const res = await axios.get('/api/user/find', {
                params: {
                    name: 'ljj',
                    age: '123123'
                }
            });
            console.log(res, 'urlQuery');
        }
        urlQuery();
    </script>
</body>

</html>